import React from 'react'
import {useNavigate} from 'react-router-dom'

export default function Def() {
  const navigate =useNavigate()
  const btn=()=>{
    navigate('/home')
  }
  const pire=()=>{
    navigate(-1)
  }
  return (
    <div style=
    {{
      width:'100vw',height:'100vh',
      backgroundColor:'white',
      position:'fixed',left:'0',top:'0',zIndex:'999'
      }}
      >
      <h1>404</h1>
      <button style={{border:'none',color:'blue',cursor:'pointer'}} onClick={btn}>返回首页</button>
      <p style={{color:'blue',cursor:'pointer'}} onClick={pire}>或者返回上一页</p>
    </div>
  )
}
